package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Clazz;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ClazzMapper extends BaseMapper<Clazz> {

    /**
     * 动态条件查询
     */
    List<Clazz> PageList(String name, LocalDate begin, LocalDate end);


    /**
     * 根据ID查询班级详情
     */
    @Select("select * from clazz where id = #{id}")
    Clazz getInfo(Integer id);
}
